package com.dd.cloud.common.annotate;


import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.dd.cloud.common.enums.SensitiveTypeEnum;
import com.dd.cloud.common.serializer.DesensitizedSerializer;

import java.lang.annotation.*;

/**
 * 脱敏注解
 * @author admin
 */
@Target({ElementType.FIELD, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented
@JacksonAnnotationsInside
@JsonSerialize(using = DesensitizedSerializer.class)
public @interface Desensitized {
    //    脱敏类型(规则)
    SensitiveTypeEnum type();
}
